using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;

namespace SurveyHost.Core.DAL{
    public partial class SPs{
        
        /// <summary>
        /// Creates an object wrapper for the WriteLog Procedure
        /// </summary>
        public static StoredProcedure WriteLog(int? EventID, int? Priority, string Severity, string Title, DateTime? Timestamp, string MachineName, string AppDomainName, string ProcessID, string ProcessName, string ThreadName, string Win32ThreadId, string Message, string FormattedMessage, int? LogId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("WriteLog" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@EventID", EventID,DbType.Int32);
        	    
            sp.Command.AddParameter("@Priority", Priority,DbType.Int32);
        	    
            sp.Command.AddParameter("@Severity", Severity,DbType.String);
        	    
            sp.Command.AddParameter("@Title", Title,DbType.String);
        	    
            sp.Command.AddParameter("@Timestamp", Timestamp,DbType.DateTime);
        	    
            sp.Command.AddParameter("@MachineName", MachineName,DbType.String);
        	    
            sp.Command.AddParameter("@AppDomainName", AppDomainName,DbType.String);
        	    
            sp.Command.AddParameter("@ProcessID", ProcessID,DbType.String);
        	    
            sp.Command.AddParameter("@ProcessName", ProcessName,DbType.String);
        	    
            sp.Command.AddParameter("@ThreadName", ThreadName,DbType.String);
        	    
            sp.Command.AddParameter("@Win32ThreadId", Win32ThreadId,DbType.String);
        	    
            sp.Command.AddParameter("@Message", Message,DbType.String);
        	    
            sp.Command.AddParameter("@FormattedMessage", FormattedMessage,DbType.String);
        	    
            sp.Command.AddOutputParameter("@LogId",DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Setup_RestorePermissions Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Setup_RestorePermissions(string name)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Setup_RestorePermissions" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@name", name,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Setup_RemoveAllRoleMembers Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Setup_RemoveAllRoleMembers(string name)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Setup_RemoveAllRoleMembers" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@name", name,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_RegisterSchemaVersion Procedure
        /// </summary>
        public static StoredProcedure Aspnet_RegisterSchemaVersion(string Feature, string CompatibleSchemaVersion, bool? IsCurrentVersion, bool? RemoveIncompatibleSchema)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_RegisterSchemaVersion" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@Feature", Feature,DbType.String);
        	    
            sp.Command.AddParameter("@CompatibleSchemaVersion", CompatibleSchemaVersion,DbType.String);
        	    
            sp.Command.AddParameter("@IsCurrentVersion", IsCurrentVersion,DbType.Boolean);
        	    
            sp.Command.AddParameter("@RemoveIncompatibleSchema", RemoveIncompatibleSchema,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_CheckSchemaVersion Procedure
        /// </summary>
        public static StoredProcedure Aspnet_CheckSchemaVersion(string Feature, string CompatibleSchemaVersion)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_CheckSchemaVersion" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@Feature", Feature,DbType.String);
        	    
            sp.Command.AddParameter("@CompatibleSchemaVersion", CompatibleSchemaVersion,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Applications_CreateApplication Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Applications_CreateApplication(string ApplicationName, Guid? ApplicationId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Applications_CreateApplication" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddOutputParameter("@ApplicationId",DbType.Guid);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UnRegisterSchemaVersion Procedure
        /// </summary>
        public static StoredProcedure Aspnet_UnRegisterSchemaVersion(string Feature, string CompatibleSchemaVersion)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UnRegisterSchemaVersion" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@Feature", Feature,DbType.String);
        	    
            sp.Command.AddParameter("@CompatibleSchemaVersion", CompatibleSchemaVersion,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Users_CreateUser Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Users_CreateUser(Guid? ApplicationId, string UserName, bool? IsUserAnonymous, DateTime? LastActivityDate, Guid? UserId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Users_CreateUser" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationId", ApplicationId,DbType.Guid);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@IsUserAnonymous", IsUserAnonymous,DbType.Boolean);
        	    
            sp.Command.AddParameter("@LastActivityDate", LastActivityDate,DbType.DateTime);
        	    
            sp.Command.AddOutputParameter("@UserId",DbType.Guid);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Users_DeleteUser Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Users_DeleteUser(string ApplicationName, string UserName, int? TablesToDeleteFrom, int? NumTablesDeletedFrom)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Users_DeleteUser" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@TablesToDeleteFrom", TablesToDeleteFrom,DbType.Int32);
        	    
            sp.Command.AddOutputParameter("@NumTablesDeletedFrom",DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_AnyDataInTables Procedure
        /// </summary>
        public static StoredProcedure Aspnet_AnyDataInTables(int? TablesToCheck)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_AnyDataInTables" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@TablesToCheck", TablesToCheck,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_CreateUser Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_CreateUser(string ApplicationName, string UserName, string Password, string PasswordSalt, string Email, string PasswordQuestion, string PasswordAnswer, bool? IsApproved, DateTime? CurrentTimeUtc, DateTime? CreateDate, int? UniqueEmail, int? PasswordFormat, Guid? UserId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_CreateUser" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@Password", Password,DbType.String);
        	    
            sp.Command.AddParameter("@PasswordSalt", PasswordSalt,DbType.String);
        	    
            sp.Command.AddParameter("@Email", Email,DbType.String);
        	    
            sp.Command.AddParameter("@PasswordQuestion", PasswordQuestion,DbType.String);
        	    
            sp.Command.AddParameter("@PasswordAnswer", PasswordAnswer,DbType.String);
        	    
            sp.Command.AddParameter("@IsApproved", IsApproved,DbType.Boolean);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@CreateDate", CreateDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@UniqueEmail", UniqueEmail,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordFormat", PasswordFormat,DbType.Int32);
        	    
            sp.Command.AddOutputParameter("@UserId",DbType.Guid);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetUserByName Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_GetUserByName(string ApplicationName, string UserName, DateTime? CurrentTimeUtc, bool? UpdateLastActivity)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetUserByName" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@UpdateLastActivity", UpdateLastActivity,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetUserByUserId Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_GetUserByUserId(Guid? UserId, DateTime? CurrentTimeUtc, bool? UpdateLastActivity)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetUserByUserId" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@UserId", UserId,DbType.Guid);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@UpdateLastActivity", UpdateLastActivity,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetUserByEmail Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_GetUserByEmail(string ApplicationName, string Email)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetUserByEmail" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@Email", Email,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetPasswordWithFormat Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_GetPasswordWithFormat(string ApplicationName, string UserName, bool? UpdateLastLoginActivityDate, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetPasswordWithFormat" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@UpdateLastLoginActivityDate", UpdateLastLoginActivityDate,DbType.Boolean);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_UpdateUserInfo Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_UpdateUserInfo(string ApplicationName, string UserName, bool? IsPasswordCorrect, bool? UpdateLastLoginActivityDate, int? MaxInvalidPasswordAttempts, int? PasswordAttemptWindow, DateTime? CurrentTimeUtc, DateTime? LastLoginDate, DateTime? LastActivityDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_UpdateUserInfo" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@IsPasswordCorrect", IsPasswordCorrect,DbType.Boolean);
        	    
            sp.Command.AddParameter("@UpdateLastLoginActivityDate", UpdateLastLoginActivityDate,DbType.Boolean);
        	    
            sp.Command.AddParameter("@MaxInvalidPasswordAttempts", MaxInvalidPasswordAttempts,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordAttemptWindow", PasswordAttemptWindow,DbType.Int32);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@LastLoginDate", LastLoginDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@LastActivityDate", LastActivityDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetPassword Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_GetPassword(string ApplicationName, string UserName, int? MaxInvalidPasswordAttempts, int? PasswordAttemptWindow, DateTime? CurrentTimeUtc, string PasswordAnswer)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetPassword" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@MaxInvalidPasswordAttempts", MaxInvalidPasswordAttempts,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordAttemptWindow", PasswordAttemptWindow,DbType.Int32);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@PasswordAnswer", PasswordAnswer,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_SetPassword Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_SetPassword(string ApplicationName, string UserName, string NewPassword, string PasswordSalt, DateTime? CurrentTimeUtc, int? PasswordFormat)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_SetPassword" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@NewPassword", NewPassword,DbType.String);
        	    
            sp.Command.AddParameter("@PasswordSalt", PasswordSalt,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@PasswordFormat", PasswordFormat,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_ResetPassword Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_ResetPassword(string ApplicationName, string UserName, string NewPassword, int? MaxInvalidPasswordAttempts, int? PasswordAttemptWindow, string PasswordSalt, DateTime? CurrentTimeUtc, int? PasswordFormat, string PasswordAnswer)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_ResetPassword" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@NewPassword", NewPassword,DbType.String);
        	    
            sp.Command.AddParameter("@MaxInvalidPasswordAttempts", MaxInvalidPasswordAttempts,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordAttemptWindow", PasswordAttemptWindow,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordSalt", PasswordSalt,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@PasswordFormat", PasswordFormat,DbType.Int32);
        	    
            sp.Command.AddParameter("@PasswordAnswer", PasswordAnswer,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_UnlockUser Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_UnlockUser(string ApplicationName, string UserName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_UnlockUser" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_UpdateUser Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_UpdateUser(string ApplicationName, string UserName, string Email, string Comment, bool? IsApproved, DateTime? LastLoginDate, DateTime? LastActivityDate, int? UniqueEmail, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_UpdateUser" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@Email", Email,DbType.String);
        	    
            sp.Command.AddParameter("@Comment", Comment,DbType.String);
        	    
            sp.Command.AddParameter("@IsApproved", IsApproved,DbType.Boolean);
        	    
            sp.Command.AddParameter("@LastLoginDate", LastLoginDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@LastActivityDate", LastActivityDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@UniqueEmail", UniqueEmail,DbType.Int32);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_ChangePasswordQuestionAndAnswer Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_ChangePasswordQuestionAndAnswer(string ApplicationName, string UserName, string NewPasswordQuestion, string NewPasswordAnswer)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_ChangePasswordQuestionAndAnswer" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@NewPasswordQuestion", NewPasswordQuestion,DbType.String);
        	    
            sp.Command.AddParameter("@NewPasswordAnswer", NewPasswordAnswer,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetAllUsers Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_GetAllUsers(string ApplicationName, int? PageIndex, int? PageSize)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetAllUsers" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@PageIndex", PageIndex,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_GetNumberOfUsersOnline Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_GetNumberOfUsersOnline(string ApplicationName, int? MinutesSinceLastInActive, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_GetNumberOfUsersOnline" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@MinutesSinceLastInActive", MinutesSinceLastInActive,DbType.Int32);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_FindUsersByName Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_FindUsersByName(string ApplicationName, string UserNameToMatch, int? PageIndex, int? PageSize)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_FindUsersByName" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserNameToMatch", UserNameToMatch,DbType.String);
        	    
            sp.Command.AddParameter("@PageIndex", PageIndex,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Membership_FindUsersByEmail Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Membership_FindUsersByEmail(string ApplicationName, string EmailToMatch, int? PageIndex, int? PageSize)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Membership_FindUsersByEmail" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@EmailToMatch", EmailToMatch,DbType.String);
        	    
            sp.Command.AddParameter("@PageIndex", PageIndex,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Profile_GetProperties Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Profile_GetProperties(string ApplicationName, string UserName, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Profile_GetProperties" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Profile_SetProperties Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Profile_SetProperties(string ApplicationName, string PropertyNames, string PropertyValuesString, byte[] PropertyValuesBinary, string UserName, bool? IsUserAnonymous, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Profile_SetProperties" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@PropertyNames", PropertyNames,DbType.String);
        	    
            sp.Command.AddParameter("@PropertyValuesString", PropertyValuesString,DbType.String);
        	    
            sp.Command.AddParameter("@PropertyValuesBinary", PropertyValuesBinary,DbType.Binary);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@IsUserAnonymous", IsUserAnonymous,DbType.Boolean);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Profile_DeleteProfiles Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Profile_DeleteProfiles(string ApplicationName, string UserNames)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Profile_DeleteProfiles" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserNames", UserNames,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Profile_DeleteInactiveProfiles Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Profile_DeleteInactiveProfiles(string ApplicationName, int? ProfileAuthOptions, DateTime? InactiveSinceDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Profile_DeleteInactiveProfiles" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@ProfileAuthOptions", ProfileAuthOptions,DbType.Int32);
        	    
            sp.Command.AddParameter("@InactiveSinceDate", InactiveSinceDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Profile_GetNumberOfInactiveProfiles Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Profile_GetNumberOfInactiveProfiles(string ApplicationName, int? ProfileAuthOptions, DateTime? InactiveSinceDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Profile_GetNumberOfInactiveProfiles" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@ProfileAuthOptions", ProfileAuthOptions,DbType.Int32);
        	    
            sp.Command.AddParameter("@InactiveSinceDate", InactiveSinceDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Profile_GetProfiles Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Profile_GetProfiles(string ApplicationName, int? ProfileAuthOptions, int? PageIndex, int? PageSize, string UserNameToMatch, DateTime? InactiveSinceDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Profile_GetProfiles" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@ProfileAuthOptions", ProfileAuthOptions,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageIndex", PageIndex,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@UserNameToMatch", UserNameToMatch,DbType.String);
        	    
            sp.Command.AddParameter("@InactiveSinceDate", InactiveSinceDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the GetData Procedure
        /// </summary>
        public static StoredProcedure GetData(int? surveyLength, string measureName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetData" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@surveyLength", surveyLength,DbType.Int32);
        	    
            sp.Command.AddParameter("@measureName", measureName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_IsUserInRole Procedure
        /// </summary>
        public static StoredProcedure Aspnet_UsersInRoles_IsUserInRole(string ApplicationName, string UserName, string RoleName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_IsUserInRole" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_GetRolesForUser Procedure
        /// </summary>
        public static StoredProcedure Aspnet_UsersInRoles_GetRolesForUser(string ApplicationName, string UserName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_GetRolesForUser" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Roles_CreateRole Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Roles_CreateRole(string ApplicationName, string RoleName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Roles_CreateRole" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Roles_DeleteRole Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Roles_DeleteRole(string ApplicationName, string RoleName, bool? DeleteOnlyIfRoleIsEmpty)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Roles_DeleteRole" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            sp.Command.AddParameter("@DeleteOnlyIfRoleIsEmpty", DeleteOnlyIfRoleIsEmpty,DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Roles_RoleExists Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Roles_RoleExists(string ApplicationName, string RoleName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Roles_RoleExists" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_AddUsersToRoles Procedure
        /// </summary>
        public static StoredProcedure Aspnet_UsersInRoles_AddUsersToRoles(string ApplicationName, string UserNames, string RoleNames, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_AddUsersToRoles" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserNames", UserNames,DbType.String);
        	    
            sp.Command.AddParameter("@RoleNames", RoleNames,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_RemoveUsersFromRoles Procedure
        /// </summary>
        public static StoredProcedure Aspnet_UsersInRoles_RemoveUsersFromRoles(string ApplicationName, string UserNames, string RoleNames)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_RemoveUsersFromRoles" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserNames", UserNames,DbType.String);
        	    
            sp.Command.AddParameter("@RoleNames", RoleNames,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_GetUsersInRoles Procedure
        /// </summary>
        public static StoredProcedure Aspnet_UsersInRoles_GetUsersInRoles(string ApplicationName, string RoleName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_GetUsersInRoles" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_UsersInRoles_FindUsersInRole Procedure
        /// </summary>
        public static StoredProcedure Aspnet_UsersInRoles_FindUsersInRole(string ApplicationName, string RoleName, string UserNameToMatch)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_UsersInRoles_FindUsersInRole" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            sp.Command.AddParameter("@UserNameToMatch", UserNameToMatch,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Roles_GetAllRoles Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Roles_GetAllRoles(string ApplicationName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Roles_GetAllRoles" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Personalization_GetApplicationId Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Personalization_GetApplicationId(string ApplicationName, Guid? ApplicationId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Personalization_GetApplicationId" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddOutputParameter("@ApplicationId",DbType.Guid);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_Paths_CreatePath Procedure
        /// </summary>
        public static StoredProcedure Aspnet_Paths_CreatePath(Guid? ApplicationId, string Path, Guid? PathId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Paths_CreatePath" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationId", ApplicationId,DbType.Guid);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            sp.Command.AddOutputParameter("@PathId",DbType.Guid);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationAllUsers_GetPageSettings Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationAllUsers_GetPageSettings(string ApplicationName, string Path)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationAllUsers_GetPageSettings" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationAllUsers_ResetPageSettings Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationAllUsers_ResetPageSettings(string ApplicationName, string Path)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationAllUsers_ResetPageSettings" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationAllUsers_SetPageSettings Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationAllUsers_SetPageSettings(string ApplicationName, string Path, byte[] PageSettings, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationAllUsers_SetPageSettings" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            sp.Command.AddParameter("@PageSettings", PageSettings,DbType.Binary);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationPerUser_GetPageSettings Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationPerUser_GetPageSettings(string ApplicationName, string UserName, string Path, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationPerUser_GetPageSettings" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationPerUser_ResetPageSettings Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationPerUser_ResetPageSettings(string ApplicationName, string UserName, string Path, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationPerUser_ResetPageSettings" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationPerUser_SetPageSettings Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationPerUser_SetPageSettings(string ApplicationName, string UserName, string Path, byte[] PageSettings, DateTime? CurrentTimeUtc)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationPerUser_SetPageSettings" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            sp.Command.AddParameter("@PageSettings", PageSettings,DbType.Binary);
        	    
            sp.Command.AddParameter("@CurrentTimeUtc", CurrentTimeUtc,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationAdministration_DeleteAllState Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationAdministration_DeleteAllState(bool? AllUsersScope, string ApplicationName, int? Count)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationAdministration_DeleteAllState" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@AllUsersScope", AllUsersScope,DbType.Boolean);
        	    
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddOutputParameter("@Count",DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationAdministration_ResetSharedState Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationAdministration_ResetSharedState(int? Count, string ApplicationName, string Path)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationAdministration_ResetSharedState" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddOutputParameter("@Count",DbType.Int32);
        	    
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationAdministration_ResetUserState Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationAdministration_ResetUserState(int? Count, string ApplicationName, DateTime? InactiveSinceDate, string UserName, string Path)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationAdministration_ResetUserState" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddOutputParameter("@Count",DbType.Int32);
        	    
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@InactiveSinceDate", InactiveSinceDate,DbType.DateTime);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationAdministration_FindState Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationAdministration_FindState(bool? AllUsersScope, string ApplicationName, int? PageIndex, int? PageSize, string Path, string UserName, DateTime? InactiveSinceDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationAdministration_FindState" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@AllUsersScope", AllUsersScope,DbType.Boolean);
        	    
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@PageIndex", PageIndex,DbType.Int32);
        	    
            sp.Command.AddParameter("@PageSize", PageSize,DbType.Int32);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@InactiveSinceDate", InactiveSinceDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_PersonalizationAdministration_GetCountOfState Procedure
        /// </summary>
        public static StoredProcedure Aspnet_PersonalizationAdministration_GetCountOfState(int? Count, bool? AllUsersScope, string ApplicationName, string Path, string UserName, DateTime? InactiveSinceDate)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_PersonalizationAdministration_GetCountOfState" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddOutputParameter("@Count",DbType.Int32);
        	    
            sp.Command.AddParameter("@AllUsersScope", AllUsersScope,DbType.Boolean);
        	    
            sp.Command.AddParameter("@ApplicationName", ApplicationName,DbType.String);
        	    
            sp.Command.AddParameter("@Path", Path,DbType.String);
        	    
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@InactiveSinceDate", InactiveSinceDate,DbType.DateTime);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the aspnet_WebEvent_LogEvent Procedure
        /// </summary>
        public static StoredProcedure Aspnet_WebEvent_LogEvent(string EventId, DateTime? EventTimeUtc, DateTime? EventTime, string EventType, decimal? EventSequence, decimal? EventOccurrence, int? EventCode, int? EventDetailCode, string Message, string ApplicationPath, string ApplicationVirtualPath, string MachineName, string RequestUrl, string ExceptionType, string Details)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_WebEvent_LogEvent" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@EventId", EventId,DbType.AnsiStringFixedLength);
        	    
            sp.Command.AddParameter("@EventTimeUtc", EventTimeUtc,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EventTime", EventTime,DbType.DateTime);
        	    
            sp.Command.AddParameter("@EventType", EventType,DbType.String);
        	    
            sp.Command.AddParameter("@EventSequence", EventSequence,DbType.Decimal);
        	    
            sp.Command.AddParameter("@EventOccurrence", EventOccurrence,DbType.Decimal);
        	    
            sp.Command.AddParameter("@EventCode", EventCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@EventDetailCode", EventDetailCode,DbType.Int32);
        	    
            sp.Command.AddParameter("@Message", Message,DbType.String);
        	    
            sp.Command.AddParameter("@ApplicationPath", ApplicationPath,DbType.String);
        	    
            sp.Command.AddParameter("@ApplicationVirtualPath", ApplicationVirtualPath,DbType.String);
        	    
            sp.Command.AddParameter("@MachineName", MachineName,DbType.String);
        	    
            sp.Command.AddParameter("@RequestUrl", RequestUrl,DbType.String);
        	    
            sp.Command.AddParameter("@ExceptionType", ExceptionType,DbType.String);
        	    
            sp.Command.AddParameter("@Details", Details,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the InsertCategoryLog Procedure
        /// </summary>
        public static StoredProcedure InsertCategoryLog(int? CategoryID, int? LogID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("InsertCategoryLog" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@CategoryID", CategoryID,DbType.Int32);
        	    
            sp.Command.AddParameter("@LogID", LogID,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the AddCategory Procedure
        /// </summary>
        public static StoredProcedure AddCategory(string CategoryName, int? LogID)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("AddCategory" , DataService.GetInstance("SurveyHost"));
        	
            sp.Command.AddParameter("@CategoryName", CategoryName,DbType.String);
        	    
            sp.Command.AddParameter("@LogID", LogID,DbType.Int32);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the ClearLogs Procedure
        /// </summary>
        public static StoredProcedure ClearLogs()
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("ClearLogs" , DataService.GetInstance("SurveyHost"));
        	
            return sp;
        }

        
    }

    
}

